//package cn.wolfcode.wolf2w.business.controller;
//
//import cn.wolfcode.wolf2w.business.api.domain.QuestionCollection;
//import cn.wolfcode.wolf2w.business.service.IQuestionCollectionService;
//import cn.wolfcode.wolf2w.business.service.impl.QuestionCollectionServiceImpl;
//import cn.wolfcode.wolf2w.common.core.domain.R;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.domain.Page;
//import org.springframework.web.bind.annotation.*;
//
//@Api(tags = "问题收藏管理")
//@RestController
//@RequestMapping("/collections")
//public class QuestionCollectionController {
//
//    @Autowired
//    private IQuestionCollectionService questionCollectionService;
//
//    @ApiOperation("收藏问题")
//    @PostMapping("/{questionId}")
//    public R<?> collect(@PathVariable Long questionId, @RequestParam Long userId) {
//        questionCollectionService.collect(questionId, userId);
//        return R.ok();
//    }
//
//    @ApiOperation("取消收藏")
//    @DeleteMapping("/{questionId}")
//    public R<?> uncollect(@PathVariable Long questionId, @RequestParam Long userId) {
//        questionCollectionService.uncollect(questionId, userId);
//        return R.ok();
//    }
//
//    @ApiOperation("获取用户收藏列表")
//    @GetMapping("/user/{userId}")
//    public R<Page<QuestionCollection>> getUserCollections(
//            // 修改返回类型
//                                                            @PathVariable Long userId,
//                                                            @RequestParam(defaultValue = "1") Integer page,
//                                                            @RequestParam(defaultValue = "10") Integer pageSize) {
//        return R.ok(questionCollectionService.getUserCollections(userId, page, pageSize));
//    }
//}